using Headsight.BPMN2WF.Transformation.Transformers.Additions;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Headsight.BPMN2WF.Transformation.BPMN2TransformerMappings.Additions
{
    [TestClass]
    public class BPMN2WFTransformationsCacheWrapperTest : BPMN2WFTransformationsDelegateBaseImplTestFixture<BPMN2WFTransformationsCacheWrapper, BPMN2WFTransformationCache>
    {
        protected override BPMN2WFTransformationsCacheWrapper CreateSut(IBPMN2WFTransformations @delegate)
        {
            return new BPMN2WFTransformationsCacheWrapper(@delegate);
        }

        [TestMethod]
        public void Get_verf_Cache_set()
        {
            var result1 = (BPMN2WFTransformationCache)_sut.Get(_flowNode1);
            var result2 = (BPMN2WFTransformationCache)_sut.Get(_flowNode2);
            
            Assert.AreSame(_sut.Cache, result1.Cache);
            Assert.AreSame(_sut.Cache, result2.Cache);
        }
    }
}